Skip to content

Request Cachebuilder - #761

Open
bsofjan wants to merge 2 commits into
DataIntellectTech:masterfrom
bsofjan:requestcachebuilder
Open

Request Cachebuilder#761
bsofjan wants to merge 2 commits into
DataIntellectTech:masterfrom
bsofjan:requestcachebuilder

Conversation

@bsofjan

@bsofjan bsofjan commented Aug 31, 2026

Copy link
Copy Markdown

Build the request cachebuilder as part of Phase 3 of the Anycache Project Proposal.

Comment thread code/processes/setter.q
}

detectcachetobuild:{
latestcache:{cachename:"MyFirstCache";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, I don't see the cache always being named "MyFirstCache"?

Comment thread code/processes/setter.q
if[0 = count caches; :`cachename`newcache!(cachename,"_",string .z.P;1b)];
cachewithmaxstarttime:starts ? max starts:cands!{get ` sv x,`start} each cands:key[d] where not `end in/: value d:caches!key each caches;
if[(not isRequest) and ("N"$.setter.cacheconfig.setter.interval) < .z.P - "P"$@[last "_" vs string cachewithmaxstarttime;13 16 19;:;"::."];:`cachename`newcache!(cachename,"_",string .z.P;1b)];
:`cachename`newcache!(cachewithmaxstarttime;0b)}[]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract this to a separate function, too messy in here

Comment thread code/processes/setter.q
if[latestcache[`newcache]; cachewithmaxstarttime:` sv maincachepath,`$latestcache[`cachename]]

componentcaches:` sv' cachewithmaxstarttime,/:key .setter.cacheconfig.componentCaches
incompletecomponentcaches:key[d2] where not `end in/: value d2:componentcaches!key each componentcaches

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing semi-colons on the above 4 lines

Comment thread code/processes/setter.q
argpaths:` sv' maincachepath,'(key maincachepath) where (key maincachepath) like "AsyncCache*";
maxstarttime:string first max "P"$-1#' "_" vs' string argpaths;
argwithmaxstarttime:first argpaths where argpaths like "*",maxstarttime;
args:: get ` sv argwithmaxstarttime,`args

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does args need to be a global?

Comment thread code/processes/setter.q

// Mode of cache
main:{[args]
isRequest:: first `$(.Q.opt args)[`isRequest]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelCase for this variable in several places needs to be changed

@CJA18

CJA18 commented Sep 4, 2026

Copy link
Copy Markdown

Similarly to the other PR, you need to add detailed notes, documentation and testing proof for this. It needs to be easy for anyone to implement and use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants